﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_SMS_SendLocalMsg]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_SMS_SendLocalMsg];
GO
CREATE PROCEDURE [dbo].[sproc_SMS_SendLocalMsg]
    @sender     nvarchar(50),
    @content	nvarchar(255),
    @type       int,
    @sendtime   datetime,
    @newmsgid   int output
            
/*

============================================================
功能:    短消息发送
参数:
    @sender                 nvarchar(50)        :    发送者用户名
    @msg                      nvarchar(255),    :    信息内容
    @type                      int,            :    短消息类型。1为站内短讯，2为手机短讯
    @sendtime             datetime         ;    发送时间

============================================================

*/
AS
BEGIN
SET NOCOUNT ON

INSERT INTO UDS_SMS_Msg (Sender, Content, SendTime, Type) VALUES (@sender, @content, @sendtime, @type);
SET @newmsgid = @@identity;

END
GO